<?php if (!defined("_ECRIRE_INC_VERSION")) return;

/**
 * Dynamic tag that outputs quantity of product that belongs to composite with taking 
 * to account user changed value 
 */
 
if (!function_exists('ppr'))
 {
     function ppr($var)
     {
         echo '<pre>';
         print_r($var);
         echo '</pre>';
    
     }
 }
 
 if (!function_exists('ppre'))
 {
     function ppre($var)
     {
         ppr($var);
         exit;
     }
 }
  
 

function balise_AC_QUANTITY($p) {	
	return calculer_balise_dynamique($p,'AC_QUANTITY', array());
}

function balise_AC_QUANTITY_stat($args, $filtres) {    
	return $args;
}

function balise_AC_QUANTITY_dyn() {
    $quantity = 0;
	
	$cart = pdk_load_class('Alohacart','classes');
	
	$quantity = $cart->CountItems();
	

    return array('balise/ac_quantity', 0, 
		array('my_quantity' => $quantity            
    ));
}

?>